#pragma once

#include <list>
#include "EngineObject.h"
#include "EnginePointer.h"
#include "IEngineComponent.h"
#include "SettingsManager.h"
#include "IMessageQueue.h"
#include "Message.h"

class SystemCollection;

class IEngineSystem : public EngineObject
{
public:
	IEngineSystem(EnginePointer<SettingsManager>& settings, EnginePointer<IMessageQueue>& messages) { this->settings = settings; this->messages = messages; }
	virtual HRESULT Initialize(EnginePointer<SystemCollection>& systems) {UNREFERENCED_PARAMETER(systems); return S_OK; }
	virtual void Update(LONGLONG timeElapsed) {UNREFERENCED_PARAMETER(timeElapsed);}
	virtual void DeliverMessage(Message& m) {UNREFERENCED_PARAMETER(m);}
	virtual void Clean() {}
	virtual BOOL IsClean() { return true; }
	virtual HRESULT RegisterComponent(EnginePointer<IEngineComponent>& component) { UNREFERENCED_PARAMETER(component); return S_OK; }
	virtual GUID getSystemIdentifier() = 0;
	virtual list<GUID> getDependencies() { return list<GUID>(); }
protected:
	EnginePointer<SettingsManager> settings;
	EnginePointer<IMessageQueue> messages;
};
